package com.example.lib.socket;

import java.util.List;

public class OcrData {
    //5断开连接6接收到图片7发送数据异常8发送数据成功
    public int msgId;
    //窗口id
    public int winHand;
    //1单选2多选3移动验证
    public int orcType;
    public List<Mpoint> list;
    public String ImgStr;
    public static String ObjToStr(OcrData obj){
        String s1="";
        String start="{";
        String end="}";
        s1=start;
        s1=s1+obj.msgId;
        s1=s1+";";
        s1=s1+obj.winHand;
        s1=s1+";";
        s1=s1+obj.orcType;

        String s2="";
        for (int i=0;i<obj.list.size();i++){
            Mpoint p=obj.list.get(i);
            if (s2.equals("")){
                s2=";"+p.x+","+p.y+"";
            }else{
                s2=s2+"|"+p.x+","+p.y;
            }
        }
        s1=s1+s2;
        s1=s1+end;
        return  s1;

    }

}